package wli.java.stigs;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;

public class VulnerabilityUtil {
	String filename;
	ArrayList<Vulnerability> alist;

	public void setFileName(String filename) {
		this.filename = filename;
	}

	public void setVulnerabilityByFile() {

		try {
			FileInputStream fstream = new FileInputStream(filename);
			DataInputStream in = new DataInputStream(fstream);
			BufferedReader br = new BufferedReader(new InputStreamReader(in));
			String strLine;
			int i = 0;
			Vector<String> v = new Vector<String>();

			while ((strLine = br.readLine()) != null) {
				v.add(strLine);
			}

			String temp = null;
			Enumeration<String> enums = v.elements();
			while (enums.hasMoreElements()) {
				temp = enums.nextElement();
				System.out.println(">>>>>>>>>>>"+temp);
			}
		} catch (Exception e) {
			System.out.println(e);
		}
	}

	public List<Vulnerability> getVulnerability() {
		return alist;
	}
}
